package org.dousb.doupicture.interfaces.assembler;


import org.dousb.doupicture.domain.user.entity.Space;
import org.dousb.doupicture.interfaces.dto.space.SpaceAddRequest;
import org.dousb.doupicture.interfaces.dto.space.SpaceEditRequest;
import org.dousb.doupicture.interfaces.dto.space.SpaceUpdateRequest;
import org.springframework.beans.BeanUtils;

/**
 * SpaceAssembler
 *
 * @author 豆沙包
 * @version 1.0
 * @since 2025-11-07  20:59
 */
public class SpaceAssembler {
    public static Space toSpaceEntity(SpaceAddRequest request) {
        Space space = new Space();
        BeanUtils.copyProperties(request, space);
        return space;
    }

    public static Space toSpaceEntity(SpaceUpdateRequest request) {
        Space space = new Space();
        BeanUtils.copyProperties(request, space);
        return space;
    }

    public static Space toSpaceEntity(SpaceEditRequest request) {
        Space space = new Space();
        BeanUtils.copyProperties(request, space);
        return space;
    }
}